package demo

@Grab("org.jsoup:jsoup:1.15.3")
import cool.taomu.lang.TaomuEntry
import org.joda.time.DateTime
import org.jsoup.Connection.Method
import org.jsoup.Jsoup

public class Demo implements TaomuEntry{
    public Demo(){ }
    public void entry(){
       System.out.println("Hello World");
       System.err.println(DateTime.now());
       String url = String.format("http://hq.sinajs.cn/list=%s", "sh000001");
	   def connect = Jsoup.connect(url).referrer("http://finance.sina.com.cn");
	   def respone = connect.maxBodySize(50000000).method(Method.GET).ignoreContentType(true).execute();
	   def body = respone.body();
	   System.out.println(body);
    }
}
